import axios from '@/functions/request';
function getNoworkingList(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potCalender/doGetList",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
}
function addNoworkingList(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potCalender/doSave",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function delNoWorking(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potCalender/doRmByValue",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
/*
工作日历初始化接口
*/
function workCalendarInit(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potWorkCalender/doGetList",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
/*
工作日历获取事项接口
*/
function workCalendarGetSomething(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potWorkCalenderRef/doGetRefList",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
/*
工作日历事项编辑接口
*/
function workCalendarSomethingEdit(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potWorkCalenderRef/doModById",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
/*
工作日历事项删除接口
*/
function workCalendarSomethingDel(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potWorkCalenderRef/doRmById",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
/*
工作日历事项添加接口
*/
function workCalendarSomethingAdd(params){
    return new Promise((resolve, reject)=>{
        axios.formPost(  "/api/biz/potal/potWorkCalender/doSave",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}




export{
    getNoworkingList,
    addNoworkingList,
    delNoWorking,
    workCalendarInit,
    workCalendarGetSomething,
    workCalendarSomethingEdit,
    workCalendarSomethingDel,
    workCalendarSomethingAdd
}